<?php

class formdaftar_C extends CI_Controller {
    function __construct() {
        parent::__construct();
    }
    
    function index() {
        $this->load->view('formdaftar_V');
    }
    
    function add_pegawai() {
        if($_POST==NULL)
        {
            $this->load_view('formdaftar_V');    
        }
        
        else
        {
            $data = $this->bindData();
            $this->formdaftar_M->add_pegawai($data);
            
            $result = $this->formdaftar_M->getList($data);
            redirect('Formkasir_V/detail_pegawai/'.$result[0]->id_pegawai);
        }
    }
}

?>
